Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding index #2

Merged
merged 1 commit into from
Jan 7, 2017
Merged

Adding index #2

merged 1 commit into from
Jan 7, 2017

Conversation

asiniy
Copy link
Contributor

@asiniy asiniy commented Jan 6, 2017

No description provided.

@izelnakri
Copy link
Owner

I think we can add this as an actual comment :D 👍

# Uncomment if you want to add the following indexes to speed up special queries:
# create index(:versions, [:event, :item_id, :item_type])

@asiniy
Copy link
Contributor Author

asiniy commented Jan 6, 2017

@izelnakri I can't get the purpose of this commenting out. Why do we need it?

@izelnakri
Copy link
Owner

having indexes on those fields is a great idea however some people might not need them or need them differently, having that index has a small speed con if its not needed.

By putting a comment warning we can explicitly state that that part of the functionality is optional. Normally I like self-documenting/no-comments code however for this case I think it suits better if we have comments.

@asiniy
Copy link
Contributor Author

asiniy commented Jan 7, 2017

@izelnakri done

@izelnakri izelnakri merged commit ba3ad71 into izelnakri:master Jan 7, 2017
@asiniy asiniy deleted the patch-1 branch January 7, 2017 11:51
desoulter pushed a commit to desoulter/paper_trail that referenced this pull request Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants